package io.ede.modules.ede.service.impl;

import org.springframework.stereotype.Service;

import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.ede.common.utils.PageUtils;
import io.ede.common.utils.Query;

import io.ede.modules.ede.dao.ModelDao;
import io.ede.modules.ede.entity.ModelEntity;
import io.ede.modules.ede.service.ModelService;


@Service("modelService")
public class ModelServiceImpl extends ServiceImpl<ModelDao, ModelEntity> implements ModelService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<ModelEntity> page = this.page(
                new Query<ModelEntity>().getPage(params),
                new QueryWrapper<ModelEntity>().eq("del_flag", 1)
        );

        return new PageUtils(page);
    }

}
